Skip to content

docs: callinterface doc comments#16396

Merged
iAmMichaelConnor merged 1 commit intonextfrom
mc/call-interface-doc-comments
Aug 29, 2025
Merged

docs: callinterface doc comments#16396
iAmMichaelConnor merged 1 commit intonextfrom
mc/call-interface-doc-comments

Conversation

@iAmMichaelConnor
Copy link
Copy Markdown
Contributor

I didn't know about the call_interfaces.nr file when I documented the "call" functions in the PrivateContext and PublicContext. I've copied-over (with some very minor tweaks) the already-approved-and-merged doc comments for function calls from PrivateContext/PublicContext into call_interfaces.nr, because most devs will be exposed to those wrapper functions, rather than the functions in the context.

No code changes; just comments.

@netlify
Copy link
Copy Markdown

netlify Bot commented Aug 15, 2025

Deploy Preview for barretenberg ready!

Name Link
🔨 Latest commit 70615de
🔍 Latest deploy log https://app.netlify.com/projects/barretenberg/deploys/689efd05bb8f620007ae27b1
😎 Deploy Preview https://deploy-preview-16396--barretenberg.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

@benesjan benesjan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice and thorough. Feel free to merge once you address my comments

/// information, such as:
/// - Calling an internal public function.
/// - Calling a public function and not setting msg_sender to Option::none
/// (feature not built yet - see github).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we have an issue for this? Would make sense to link it here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yes, I've linked the pending PR

/// Makes a _read-only_ call to this private function.
///
/// This is similar to Solidity's `staticcall`. The called function
/// cannot modify state, emit L2->L2 messages, nor emit events. Any nested
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// cannot modify state, emit L2->L2 messages, nor emit events. Any nested
/// cannot modify state, emit L2->L1 messages, nor emit events. Any nested

}
}

/// Enqueues a read-only call to this private function.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In PrivateCallInterface::view you have "Makes a read-only call to this private function."

Why do you say "enqueues" here? It's in private so the functions are directly called.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, good catch. That's a typo by me

/// Enqueues a read-only call to this public function.
///
/// This is similar to Solidity's `staticcall`. The called function
/// cannot modify state, emit L2->L2 messages, nor emit events. Any nested
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// cannot modify state, emit L2->L2 messages, nor emit events. Any nested
/// cannot modify state, emit L2->L1 messages, nor emit events. Any nested

@iAmMichaelConnor iAmMichaelConnor force-pushed the mc/call-interface-doc-comments branch from 70615de to 6947971 Compare August 29, 2025 14:07
@iAmMichaelConnor iAmMichaelConnor force-pushed the mc/call-interface-doc-comments branch from 6947971 to b6d4869 Compare August 29, 2025 14:09
@iAmMichaelConnor iAmMichaelConnor added this pull request to the merge queue Aug 29, 2025
Merged via the queue into next with commit 7268a49 Aug 29, 2025
14 checks passed
@iAmMichaelConnor iAmMichaelConnor deleted the mc/call-interface-doc-comments branch August 29, 2025 15:20
ludamad pushed a commit that referenced this pull request Dec 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants